package com.fh.service.information.classe;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fh.dao.DaoSupport;
import com.fh.entity.Page;
import com.fh.util.PageData;

@Service("classeService")
public class ClasseService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;

	// private final static String Mapper = "NoticeMapper";

	/*
	 * pagelist列表
	 */
	public List<PageData> list(Page page) throws Exception {
		return (List<PageData>) dao.findForList("ClasseMapper.listPage", page);
	}

	/**
	 * 
	 * TODO 方法作用：alllist
	 * 
	 * @param pd
	 * @return
	 * @throws Exception
	 * @Author: 孙超文
	 * @Date: 2015-10-20 上午10:07:54
	 */
	public List<PageData> listAll(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("ClasseMapper.listAll", pd);
	}

	/*
	 * 通过id获取数据
	 */
	public PageData findById(PageData pd) throws Exception {
		return (PageData) dao.findForObject("ClasseMapper.findById", pd);
	}

	/*
	 * 保存
	 */
	public void save(PageData pd) throws Exception {
		dao.save("ClasseMapper.insert", pd);
	}

	/*
	 * 修改
	 */
	public void edit(PageData pd) throws Exception {
		dao.update("ClasseMapper.update", pd);
	}

	/*
	 * 删除
	 */
	public void delete(PageData pd) throws Exception {
		dao.update("ClasseMapper.delete", pd);
	}
}
